package csu.web.mypetstore.service;

import csu.web.mypetstore.domain.Cart;
import csu.web.mypetstore.persistence.CartDao;
import csu.web.mypetstore.persistence.impl.CartImpl;

public class CartService {
    private CartDao cartdao;
    public CartService(){this.cartdao = new CartImpl();}
    public void insertCart(String userid, Cart cart){cartdao.insertCart(userid,cart);}
    public void updateCArtInfo(String userid, Cart cart){cartdao.updateCart(userid, cart);}
    public boolean checkCartByUserId(String userid){return cartdao.checkCartByUserId(userid);}
    public Cart getCart(String userid){return  cartdao.getCart(userid);}
    public void updateCartInfo(String userid,String itemId,String quantity){cartdao.updateCart(userid,itemId,quantity);}
}
